<div class="title">
	<span>Stylists</span>
	<a href="<?php echo site_url('admin/add_stylist');?>" class="ibtn add">Add stylist</a>
	<div class="clear">&nbsp;</div>
</div>


<?php flash(); // display flash data?>
<?php
	if(!empty($stylists)){
	$tmpl = array ( 'table_open'  => '<table border="1" cellpadding="2" cellspacing="1" class="tbl-list" id="tbl-list">' );
	$this->table->set_heading('Username', 'Firstname', 'Lastname', 'Contact', 'Email', 'Action');
	$this->table->set_template($tmpl);
	
	foreach($stylists as $v){
		$data = array(
				$v->username,
				$v->firstname,
				$v->lastname,
				$v->contact,
				$v->email,
				'<a href="'.site_url('admin/delete/stylists/'.$v->id).'" class="btn-icon delete" title="Delete">Delete</a>
				<a href="'.site_url('admin/edit_stylist/'.$v->id).'" class="btn-icon edit" title="Edit">Edit</a>
				<a href="'.site_url('admin/reset_pw/'.$v->id).'" class="btn-icon reset" title="Reset Password">Reset</a>'
		);
		$this->table->add_row($data);	
	}
	echo $this->table->generate();
	}
	else {
		echo '<div class="msg notice"><span></span><h5>Notice</h5>No stylists available yet.</div>';	
	}
?>

